/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.hanze.bbs.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Herman
 */
@Entity
@Table(name = "boetes")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Boete.findAll", query = "SELECT b FROM Boete b"),
    @NamedQuery(name = "Boete.findById", query = "SELECT b FROM Boete b WHERE b.id = :id"),
    @NamedQuery(name = "Boete.findByBsn", query = "SELECT b FROM Boete b WHERE b.bsn = :bsn"),
    @NamedQuery(name = "Boete.findBySnelheidslimiet", query = "SELECT b FROM Boete b WHERE b.snelheidslimiet = :snelheidslimiet"),
    @NamedQuery(name = "Boete.findByGereden", query = "SELECT b FROM Boete b WHERE b.gereden = :gereden"),
    @NamedQuery(name = "Boete.findByDatum", query = "SELECT b FROM Boete b WHERE b.datum = :datum")})
public class Boete implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 9)
    @Column(name = "bsn")
    private String bsn;
    @Basic(optional = false)
    @NotNull
    @Column(name = "snelheidslimiet")
    private int snelheidslimiet;
    @Basic(optional = false)
    @NotNull
    @Column(name = "gereden")
    private int gereden;
    @Basic(optional = false)
    @NotNull
    @Column(name = "datum")
    @Temporal(TemporalType.DATE)
    private Date datum;

    public Boete() {
    }

    public Boete(Integer id) {
        this.id = id;
    }

    public Boete(Integer id, String bsn, int snelheidslimiet, int gereden, Date datum) {
        this.id = id;
        this.bsn = bsn;
        this.snelheidslimiet = snelheidslimiet;
        this.gereden = gereden;
        this.datum = datum;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getBsn() {
        return bsn;
    }

    public void setBsn(String bsn) {
        this.bsn = bsn;
    }

    public int getSnelheidslimiet() {
        return snelheidslimiet;
    }

    public void setSnelheidslimiet(int snelheidslimiet) {
        this.snelheidslimiet = snelheidslimiet;
    }

    public int getGereden() {
        return gereden;
    }

    public void setGereden(int gereden) {
        this.gereden = gereden;
    }

    public Date getDatum() {
        return datum;
    }

    public void setDatum(Date datum) {
        this.datum = datum;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Boete)) {
            return false;
        }
        Boete other = (Boete) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "nl.hanze.bbs.entity.Boete[ id=" + id + " ]";
    }
    
}
